<?php
include($classes_path.'/class.comments.php');
$commententry = new comments();
$commententry->set_page($pageid);
$commententry->set_id($article);
$commententry->set_user($user);

print('<div id="comments">');
print('<h3>'.$commententry->get_head().'</h3>');
$commentpost = $commententry->get_comments();

if(!empty($commentpost)){
    foreach($commentpost as $comment)
    {
        print('<div class="comment_header"');
        print('<p class="nomarg">By <a class="blacknbold" href="../pages/profile/user/'.strtolower($comment["id"]).'/'.strtolower($comment["author"]).'">'.ucfirst($comment["author"]).'</a> on '.$comment["time"].' '.$comment["os"].'</p>');
        print('</div>');
        print('<div class="comment_content"');
        print('<p class="nomarg">'.$comment["body"].'</p>');
        print('</div>');
    }
}
print('</div>');
?>
